package com.into.common.csv.converters;

import com.into.common.csv.CSVConverter;

public class IntegerConverter implements CSVConverter<Integer> {

	@Override
	public Integer fromString(String value) throws Exception {
		if (value == null || value.length() == 0)
			return 0;
		return Integer.parseInt(value);
	}

	@Override
	public String toString(Integer value) throws Exception {
		return value.toString();
	}

}
